#-*- Makefile -*-
#
# ${R_HOME}/src/library/Recommended/Makefile.win

include ../../../share/make/vars.mk

include ../../gnuwin32/MkRules

## foo.ts is the timestamp for package foo;
## foo.tgz is a copy of foo_x.y-z.tar.gz.
## unfortunately package foo can be uninstalled and leave foo.ts

## For developers: A shell script, tools/rsync-recommended, updates
## packages from the CRAN master directory. 

OBJECTS = $(R_PKGS_RECOMMENDED:=.ts)

CLEANFILES = $(OBJECTS) stamp-recommended

.SUFFIXES:
.SUFFIXES: .tgz .ts

all: stamp-recommended

stamp-recommended: $(OBJECTS)
	@touch $@

## allow parallel installs, modulo dependencies below
INSTALL_OPTS=--pkglock --install-tests --data-compress="xz"


RCMD = ../../../bin/Rcmd

.tgz.ts:
	@echo
	@echo "----- installing recommended package" `basename $< .tgz`
	@$(RCMD) INSTALL $(INSTALL_OPTS) -l $(RHOME)/library `basename $< .tgz`_*.tar.gz
	@touch $@

clean:
	@rm -f $(CLEANFILES)

## Hardcoded dependencies (see '../../../share/make/vars.mk')
mgcv.ts: nlme.ts MASS.ts Matrix.ts
nlme.ts: lattice.ts
class.ts: MASS.ts
